package com.hqyj.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

@Controller
public class PageController {

    //访问login
    @RequestMapping("/{url}")
    public String page(@PathVariable("url") String url){
        return url;
    }


    //访问user页面
    @RequestMapping("/userPage/{url}")
    public String userPage(@PathVariable("url") String url){
        return "user/" + url;
    }

    //访问customer页面
    @RequestMapping("/customerPage/{url}")
    public String customerPage(@PathVariable("url") String url){
        return "customer/"+ url;
    }

    //访问role页面
    @RequestMapping("/rolePage/{url}")
    public String rolePage(@PathVariable("url") String url){
        return "role/"+ url;
    }

    //客户页面跳转
    @RequestMapping("/vipPage/{url}")
    public  String vipPage(@PathVariable("url") String url){

        return "vipcustomer/" + url;
    }
    //订单页面跳转
    @RequestMapping("/tstPage/{url}")
    public  String transactionPage(@PathVariable("url") String url){

        return "transaction/" + url;
    }
    //售后
    @RequestMapping("/afterPage/{url}")
    public String afterPage(@PathVariable("url") String url){

        return "afterservice/" +url;
    }
}
